package kjh820909.basic;

public class J15_Printer {

	public static void main(String[] args) {
		Printer p01 = new Printer();
		p01.print();
		
		InkjetPrinter p02 = new InkjetPrinter();
		p02.print();
		
		LaserPrinter p03 = new LaserPrinter();
		p03.print();
		
	} // main

} // class

// 부모 클래스
class Printer{
	public String model;
	public String maker;
	public String type;
	public int papers;
	public int remain;
	
	public void print(){
		System.out.println("프린터입니다!");
	}
	
}

// 자식 클래스
class InkjetPrinter extends Printer{
	public int inkRemains;
	
	@Override
	public void print() {
		System.out.println("잉크젯프린터입니다");
	}
	
	
}

class LaserPrinter extends Printer{
	public int tonerRemains;
	
	public void print() {
		System.out.println("레이저프린터입니다");
	}
	
}


















